//
//  WZGQcodeViewController.m
//  SinaWeibo-OC
//
//  Created by apple on 15/12/7.
//  Copyright © 2015年 apple. All rights reserved.
//

#import "WZGQcodeViewController.h"

@interface WZGQcodeViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *constraintScan;

@end

@implementation WZGQcodeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //添加定时器
    CADisplayLink *link = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
    
    [link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
    
}
- (void)update {
    
    self.constraintScan.constant -= 4;
    
    if ( self.constraintScan.constant == -124) {
        
        self.constraintScan.constant = 124;
    }
}

@end
